package com.java.common.boot.listener;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.ApplicationStartingEvent;
import org.springframework.context.ApplicationListener;

/**
 * 启动监听
 * 
 * @author yilabao
 * @date 2021年2月3日
 */
public class ApplicationStartingEventListener implements ApplicationListener<ApplicationStartingEvent> {

    @Override
    public void onApplicationEvent(ApplicationStartingEvent event) {
        SpringApplication application = event.getSpringApplication();
        application.setBannerMode(Banner.Mode.OFF);
    }

}